﻿package component.tree.service;

import java.util.List;

import component.tree.dao.ComponentDAO;
import component.tree.dao.IComponentDAO;
import component.tree.entity.Entity;

public class ComponentService implements IComponentService {
	//通过sql查询数据,返回List<Object[]>
	public List getDataBySql(String sql){
		IComponentDAO dao = new ComponentDAO();
		List list = dao.findDataBySql(sql);
		return list;
	}
	
	//通过sql查询数据,返回List<Entity>
	public List getDataBySql(String sql,Entity entity){
		IComponentDAO dao = new ComponentDAO();
		List list = dao.findDataBySql(sql,entity);
		return list;
	}
}
